package com.itheima.d9Lambda;

public class LambdaDemo1 {
    public static void main(String[] args) {
        //1,学会使用Lambda标准格式
        Swim a = new Swim() {
            @Override
            public void sw() {
                System.out.println("swiming");
            }
        };
        Swim b = () -> {
                System.out.println("b swi");
            };
        go(b);
    }
    public static  void go(Swim swim){
        swim.sw();
    }

}
@FunctionalInterface
interface Swim {
    void sw();
}
